<?php

namespace mpend\modules\member\controllers;

use Yii;
use mpend\components\Controller;
use common\helpers\Url;
use mpend\modules\member\models\MemberSearch;

/**
 * 积分中心首页
 * Default controller for the `credit` module
 */
class DefaultController extends Controller {

    /**
     * @inheritdoc
     */
    protected function rules() {
        return [
            [
                'allow' => true,
                'roles' => ['@'],
            ],
        ];
    }

    /**
     * @inheritdoc
     */
    protected function verbs() {
        return [
            'index' => ['GET'],
            '*' => ['POST'],
        ];
    }

    /**
     * @inheritdoc
     */
    public function actionIndex() {
        return MemberSearch::findByUserId($this->uid);
    }

}
